﻿using System;

namespace Vbyte.SharpOrm.Config
{
    /// <summary>
    /// 最长限制
    /// </summary>
    [AttributeUsage(AttributeTargets.Property, Inherited = true, AllowMultiple = false)]
    public class MaxLengthAttribute : Attribute
    {
        /// <summary>
        /// Gets or sets the max.
        /// </summary>
        /// <value>The max.</value>
        public int Max { get; set; }

        /// <summary>
        /// Initializes a new instance of the <see cref="MaxLengthAttribute"/> class.
        /// </summary>
        /// <param name="max">The max.</param>
        public MaxLengthAttribute(int max)
        {
            Max = max;
        }
    }
}